
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class Zuoye5_9 {

	public static void main(String[] args) {
		try {
			Document doc = Jsoup.parse(new URL("https://www.taobao.com"), 1000);
			Elements elements = doc.getAllElements();

			Map<String, Integer> map = new HashMap<String, Integer>();
			String name;
			for (Element e : elements) {
				name = e.nodeName();
				if (!map.containsKey(name)) {
					map.put(name, 1);
				} else {
					map.put(name, map.get(name) + 1);
				}
			}
			System.out.println(map.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
